class my_stack():
    def __init__(self):
        self.data=[]
        self.top=-1
    def is_empty(self):
        return self.top==-1
    def push(self,val):
        self.top+=1
        self.data.append(val)
    def pop(self):
        if self.is_empty():
            raise Exception('Underflow')
        else:
            self.top-=1
            return self.data[self.top+1]

if __name__=='__main__':
    a=my_stack()
    a.push(1)
    a.push(10000)
    print a.pop()
    print a.pop()
    #print a.pop()
